package com.sfac.modules.test.controller;

import com.sfac.modules.test.pojo.Country;
import com.sfac.modules.test.service.CountryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/country")
public class CountryController {
    @Autowired
    private CountryService countryService;


    @GetMapping("/{countryId}")
    public Country selectCountryById(@PathVariable int countryId){
        return countryService.selectCountryById(countryId);
    }
}
